package com.dxy.service.impl;

import com.dxy.dao.BaseAdminDao;
import com.dxy.dao.impl.BaseAdminDaoImpl;
import com.dxy.service.AdminService;

import java.util.Date;

public class AdminServiceImpl implements AdminService {
    private BaseAdminDao baseAdminDao = new BaseAdminDaoImpl();

    /**
     * 更新登录时间与ip
     * @param username
     * @param date
     * @param ip
     */
    @Override
    public void updateLoginTimeAndIP(String username, Date date, String ip) {
        baseAdminDao.updateLoginTime(username,date,ip);

    }

    /**
     * 登录
     * @param username
     * @param password
     * @return true 表示成功 false 失败
     */
    @Override
    public boolean login(String username, String password) {
        return baseAdminDao.login(username,password);
    }
}
